<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;wchar.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_010_458">&nbsp;</a>NAME</h4><blockquote>
wchar.h - wide-character types
</blockquote><h4><a name = "tag_000_010_459">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;wchar.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_010_460">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>&lt;wchar.h&gt;</i>
header defines the following data types through
<dl compact>

<dt><b>wchar_t</b><dd>As described in
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>.

<dt><b>wint_t</b><dd><index term="data type, wint_t"></index>
An integral type capable of storing any valid
value of
<b>wchar_t</b>,
or
<b>WEOF</b>.

<dt><b>wctype_t</b><dd><index term="data type, wctype_t"></index>
A scalar type of a data object that can hold values which represent
locale-specific character classification.

<dt><b>mbstate_t</b><dd><index term="data type, mbstate_t"></index>
An object type other than an array type that can hold the conversion
state information necessary to convert between sequences of (possibly
multibyte) characters and wide-characters.
If a codeset is being used such that an
<b>mbstate_t</b>
needs to preserve more than 2 levels of reserved state, the results
are unspecified.

<dt><b>FILE</b><dd>
As described in
<i><a href="stdio.h.html">&lt;stdio.h&gt;</a></i>.

<dt><b>size_t</b><dd>As described in
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>.

</dl>
<p>
The
<i>&lt;wchar.h&gt;</i>
header
declares the following as functions and may also define them as macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
wint_t            <a href="btowc.html">btowc</a>(int);
int               <a href="fwprintf.html">fwprintf</a>(FILE *, const wchar_t *, ...);
int               <a href="fwscanf.html">fwscanf</a>(FILE *, const wchar_t *, ...);
int               <a href="iswalnum.html">iswalnum</a>(wint_t);
int               <a href="iswalpha.html">iswalpha</a>(wint_t);
int               <a href="iswcntrl.html">iswcntrl</a>(wint_t);
int               <a href="iswdigit.html">iswdigit</a>(wint_t);
int               <a href="iswgraph.html">iswgraph</a>(wint_t);
int               <a href="iswlower.html">iswlower</a>(wint_t);
int               <a href="iswprint.html">iswprint</a>(wint_t);
int               <a href="iswpunct.html">iswpunct</a>(wint_t);
int               <a href="iswspace.html">iswspace</a>(wint_t);
int               <a href="iswupper.html">iswupper</a>(wint_t);
int               <a href="iswxdigit.html">iswxdigit</a>(wint_t);
int               <a href="iswctype.html">iswctype</a>(wint_t, wctype_t);
wint_t            <a href="fgetwc.html">fgetwc</a>(FILE *);
wchar_t          *<a href="fgetws.html">fgetws</a>(wchar_t *, int, FILE *);
wint_t            <a href="fputwc.html">fputwc</a>(wchar_t, FILE *);
int               <a href="fputws.html">fputws</a>(const wchar_t *, FILE *);
int               <a href="fwide.html">fwide</a>(FILE *, int);
wint_t            <a href="getwc.html">getwc</a>(FILE *);
wint_t            <a href="getwchar.html">getwchar</a>(void);
int               <a href="mbsinit.html">mbsinit</a>(const mbstate_t *);
size_t            <a href="mbrlen.html">mbrlen</a>(const char *, size_t, mbstate_t *);
size_t            <a href="mbrtowc.html">mbrtowc</a>(wchar_t *, const char *, size_t,
                      mbstate_t *);
size_t            <a href="mbsrtowcs.html">mbsrtowcs</a>(wchar_t *, const char **, size_t,
                      mbstate_t *);
wint_t            <a href="putwc.html">putwc</a>(wchar_t, FILE *);
wint_t            <a href="putwchar.html">putwchar</a>(wchar_t);
int               <a href="swprintf.html">swprintf</a>(wchar_t *, size_t, const wchar_t *, ...);
int               <a href="swscanf.html">swscanf</a>(const wchar_t *, const wchar_t *, ...);
wint_t            <a href="towlower.html">towlower</a>(wint_t);
wint_t            <a href="towupper.html">towupper</a>(wint_t);
wint_t            <a href="ungetwc.html">ungetwc</a>(wint_t, FILE *);
int               <a href="vfwprintf.html">vfwprintf</a>(FILE *, const wchar_t *, va_list);
int               <a href="vwprintf.html">vwprintf</a>(const wchar_t *, va_list);
int               <a href="vswprintf.html">vswprintf</a>(wchar_t *, size_t, const wchar_t *,
                      va_list);
size_t            <a href="wcrtomb.html">wcrtomb</a>(char *, wchar_t, mbstate_t *);
wchar_t          *<a href="wcscat.html">wcscat</a>(wchar_t *, const wchar_t *);
wchar_t          *<a href="wcschr.html">wcschr</a>(const wchar_t *, wchar_t);
int               <a href="wcscmp.html">wcscmp</a>(const wchar_t *, const wchar_t *);
int               <a href="wcscoll.html">wcscoll</a>(const wchar_t *, const wchar_t *);
wchar_t          *<a href="wcscpy.html">wcscpy</a>(wchar_t *, const wchar_t *);
size_t            <a href="wcscspn.html">wcscspn</a>(const wchar_t *, const wchar_t *);
size_t            <a href="wcsftime.html">wcsftime</a>(wchar_t *, size_t, const wchar_t *,
                      const struct tm *);
size_t            <a href="wcslen.html">wcslen</a>(const wchar_t *);
wchar_t          *<a href="wcsncat.html">wcsncat</a>(wchar_t *, const wchar_t *, size_t);
int               <a href="wcsncmp.html">wcsncmp</a>(const wchar_t *, const wchar_t *, size_t);
wchar_t          *<a href="wcsncpy.html">wcsncpy</a>(wchar_t *, const wchar_t *, size_t);
wchar_t          *<a href="wcspbrk.html">wcspbrk</a>(const wchar_t *, const wchar_t *);
wchar_t          *<a href="wcsrchr.html">wcsrchr</a>(const wchar_t *, wchar_t);
size_t            <a href="wcsrtombs.html">wcsrtombs</a>(char *, const wchar_t **, size_t,
                      mbstate_t *);
size_t            <a href="wcsspn.html">wcsspn</a>(const wchar_t *, const wchar_t *);
wchar_t          *<a href="wcsstr.html">wcsstr</a>(const wchar_t *, const wchar_t *);
double            <a href="wcstod.html">wcstod</a>(const wchar_t *, wchar_t **);
wchar_t          *<a href="wcstok.html">wcstok</a>(wchar_t *, const wchar_t *, wchar_t **);
long int          <a href="wcstol.html">wcstol</a>(const wchar_t *, wchar_t **, int);
unsigned long int <a href="wcstoul.html">wcstoul</a>(const wchar_t *, wchar_t **, int);
wchar_t          *<a href="wcswcs.html">wcswcs</a>(const wchar_t *, const wchar_t *);
int               <a href="wcswidth.html">wcswidth</a>(const wchar_t *, size_t);
size_t            <a href="wcsxfrm.html">wcsxfrm</a>(wchar_t *, const wchar_t *, size_t);
int               <a href="wctob.html">wctob</a>(wint_t);
wctype_t          <a href="wctype.html">wctype</a>(const char *);
int               <a href="wcwidth.html">wcwidth</a>(wchar_t);
wchar_t          *<a href="wmemchr.html">wmemchr</a>(const wchar_t *, wchar_t, size_t);
int               <a href="wmemcmp.html">wmemcmp</a>(const wchar_t *, const wchar_t *, size_t);
wchar_t          *<a href="wmemcpy.html">wmemcpy</a>(wchar_t *, const wchar_t *, size_t);
wchar_t          *<a href="wmemmove.html">wmemmove</a>(wchar_t *, const wchar_t *, size_t);
wchar_t          *<a href="wmemset.html">wmemset</a>(wchar_t *, wchar_t, size_t);
int               <a href="wprintf.html">wprintf</a>(const wchar_t *, ...);
int               <a href="wscanf.html">wscanf</a>(const wchar_t *, ...);
</code>
</pre>
<p>
<i>&lt;wchar.h&gt;</i>
defines the following macro names:
<dl compact>

<dt>WCHAR_MAX<dd>
The maximum value representable by an object of type
<b>wchar_t</b>.

<dt>WCHAR_MIN<dd>
The minimum value representable by an object of type
<b>wchar_t</b>.

<dt>WEOF<dd>
Constant expression of type
<b>wint_t</b>
that is returned by several WP functions to indicate end-of-file.

<dt>NULL<dd>As described in
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>.

</dl>
<p>
The tag
<b>tm</b>
is declared as naming an incomplete structure type, the contents of
which are described in the header
<i><a href="time.h.html">&lt;time.h&gt;</a></i>.
<p>
Inclusion of the
<i>&lt;wchar.h&gt;</i>
header may make visible all symbols from the headers
<i><a href="ctype.h.html">&lt;ctype.h&gt;</a></i>,
<i><a href="stdio.h.html">&lt;stdio.h&gt;</a></i>,
<i><a href="stdarg.h.html">&lt;stdarg.h&gt;</a></i>,
<i><a href="stdlib.h.html">&lt;stdlib.h&gt;</a></i>,
<i><a href="string.h.html">&lt;string.h&gt;</a></i>,
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>
and
<i><a href="time.h.html">&lt;time.h&gt;</a></i>.
</blockquote><h4><a name = "tag_000_010_461">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_010_462">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_010_463">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="btowc.html">btowc()</a></i>,
<i><a href="fwprintf.html">fwprintf()</a></i>,
<i><a href="fwscanf.html">fwscanf()</a></i>,
<i><a href="iswalnum.html">iswalnum()</a></i>,
<i><a href="iswalpha.html">iswalpha()</a></i>,
<i><a href="iswcntrl.html">iswcntrl()</a></i>,
<i><a href="iswdigit.html">iswdigit()</a></i>,
<i><a href="iswgraph.html">iswgraph()</a></i>,
<i><a href="iswlower.html">iswlower()</a></i>,
<i><a href="iswprint.html">iswprint()</a></i>,
<i><a href="iswpunct.html">iswpunct()</a></i>,
<i><a href="iswspace.html">iswspace()</a></i>,
<i><a href="iswupper.html">iswupper()</a></i>,
<i><a href="iswxdigit.html">iswxdigit()</a></i>,
<i><a href="iswctype.html">iswctype()</a></i>,
<i><a href="fgetwc.html">fgetwc()</a></i>,
<i><a href="fgetws.html">fgetws()</a></i>,
<i><a href="fputwc.html">fputwc()</a></i>,
<i><a href="fputws.html">fputws()</a></i>,
<i><a href="fwide.html">fwide()</a></i>,
<i><a href="getwc.html">getwc()</a></i>,
<i><a href="getwchar.html">getwchar()</a></i>,
<i><a href="mbsinit.html">mbsinit()</a></i>,
<i><a href="mbrlen.html">mbrlen()</a></i>,
<i><a href="mbrtowc.html">mbrtowc()</a></i>,
<i><a href="mbsrtowcs.html">mbsrtowcs()</a></i>,
<i><a href="putwc.html">putwc()</a></i>,
<i><a href="putwchar.html">putwchar()</a></i>,
<i><a href="swprintf.html">swprintf()</a></i>,
<i><a href="swscanf.html">swscanf()</a></i>,
<i><a href="towlower.html">towlower()</a></i>,
<i><a href="towupper.html">towupper()</a></i>,
<i><a href="ungetwc.html">ungetwc()</a></i>,
<i><a href="vfwprintf.html">vfwprintf()</a></i>,
<i><a href="vwprintf.html">vwprintf()</a></i>,
<i><a href="vswprintf.html">vswprintf()</a></i>,
<i><a href="wcrtomb.html">wcrtomb()</a></i>,
<i><a href="wcsrtombs.html">wcsrtombs()</a></i>,
<i><a href="wcscat.html">wcscat()</a></i>,
<i><a href="wcschr.html">wcschr()</a></i>,
<i><a href="wcscmp.html">wcscmp()</a></i>,
<i><a href="wcscoll.html">wcscoll()</a></i>,
<i><a href="wcscpy.html">wcscpy()</a></i>,
<i><a href="wcscspn.html">wcscspn()</a></i>,
<i><a href="wcsftime.html">wcsftime()</a></i>,
<i><a href="wcslen.html">wcslen()</a></i>,
<i><a href="wcsncat.html">wcsncat()</a></i>,
<i><a href="wcsncmp.html">wcsncmp()</a></i>,
<i><a href="wcsncpy.html">wcsncpy()</a></i>,
<i><a href="wcspbrk.html">wcspbrk()</a></i>,
<i><a href="wcsrchr.html">wcsrchr()</a></i>,
<i><a href="wcsspn.html">wcsspn()</a></i>,
<i><a href="wcsstr.html">wcsstr()</a></i>,
<i><a href="wcstod.html">wcstod()</a></i>,
<i><a href="wcstok.html">wcstok()</a></i>,
<i><a href="wcstol.html">wcstol()</a></i>,
<i><a href="wcstoul.html">wcstoul()</a></i>,
<i><a href="wcswcs.html">wcswcs()</a></i>,
<i><a href="wcswidth.html">wcswidth()</a></i>,
<i><a href="wcsxfrm.html">wcsxfrm()</a></i>,
<i><a href="wctob.html">wctob()</a></i>,
<i><a href="wctype.html">wctype()</a></i>,
<i><a href="wcwidth.html">wcwidth()</a></i>,
<i><a href="wmemchr.html">wmemchr()</a></i>,
<i><a href="wmemcmp.html">wmemcmp()</a></i>,
<i><a href="wmemcpy.html">wmemcpy()</a></i>,
<i><a href="wmemmove.html">wmemmove()</a></i>,
<i><a href="wmemset.html">wmemset()</a></i>,
<i><a href="wprintf.html">wprintf()</a></i>,
<i><a href="wscanf.html">wscanf()</a></i>,
<i><a href="ctype.h.html">&lt;ctype.h&gt;</a></i>,
<i><a href="stdio.h.html">&lt;stdio.h&gt;</a></i>,
<i><a href="stdarg.h.html">&lt;stdarg.h&gt;</a></i>,
<i><a href="stdlib.h.html">&lt;stdlib.h&gt;</a></i>,
<i><a href="string.h.html">&lt;string.h&gt;</a></i>,
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>
and
<i><a href="time.h.html">&lt;time.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
